import Vue from 'vue'
import App from './App.vue'

/***** 全局样式 ****/
import "./assets/css/common.css";

/***** 路由 ****/
import router from './router/index.js'
/** 路由守卫 **/
import '@/router/router.js'

/***** iView ****/
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
Vue.use(ViewUI);

/***** KFormDesign ****/
import KFormDesign from 'k-form-design'
import 'k-form-design/lib/k-form-design.css'
Vue.use(KFormDesign)

/***** Vuex ****/
import store from './store'
import Vuex from 'vuex'
Vue.use(Vuex)

/***** Layer ****/
import layer from 'vue-layer'
import 'vue-layer/lib/vue-layer.css';
Vue.prototype.$layer = layer(Vue);

/***** 缩略图Viewer ****/
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)
Viewer.setDefaults({
  navbar: false, //底部缩略图
  toolbar: true, //底部工具栏
  button: true, //右上角按钮
  title: false, //当前图片标题
  movable: true, //是否可以移动
  zoomable: true, //是否可以缩放
  transition: true //使用 CSS3 过度
})

/***** 权限按钮 ****/
import has from './../src/utils/btnPermission.js';
Vue.use(has)

//*************** 自定义全局组件 ***************
import Pagination from './views/components/MyPagination';
Vue.use(Pagination)
import RefreshButton from './views/components/MyRefreshButton';
Vue.use(RefreshButton)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
